﻿@{
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
}
<html>
<head>
    <script type="text/javascript">
        function saveAmount() {
            var at = $('#Amount').numberbox('getValue');
            $.post('/User/SaveAmount', { amount: at }, function (result) {
                if (result == "success") {
                    $.messager.alert("Message", "Save Amont Successfully");
                    $('#ff').form('clear');
                } else {
                    $.messager.show({    // show error message
                        title: 'Error',
                        msg: 'Please contact the admin for support'//result.errorMsg
                    });
                }
            }, 'text');
        }
    </script>
</head>
<body>
    <div class="easyui-panel" title="My Profile" style="height: 500px" iconCls="icon-ok">
        <div style="padding: 10px 0 10px 60px">
            <form id="ff" method="post">
                <table>
                    <tr>
                        <td>Amount:</td>
                        <td>
                            <input type="text" maxlength="5" id="Amount" name="Amount" class="easyui-numberbox" data-options="min:0,precision:2,required:true">
                    </tr>
                    <tr>
                        <td colspan="2" style="text-align:center;padding-top: 10px">
                            <a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-ok" onclick="saveAmount()">Save</a>
                        </td>
                    </tr>
                </table>
            </form>
        </div>
    </div>
</body>
</html>

